// 内存加载图片
package main

import (
	_ "embed"

	app "gitee.com/go_888/xcgui/xcgui/app"
	widget "gitee.com/go_888/xcgui/xcgui/widget"
	window "gitee.com/go_888/xcgui/xcgui/window"
	xc "gitee.com/go_888/xcgui/xcgui/xc"
	xcc "gitee.com/go_888/xcgui/xcgui/xcc"
)

//go:embed 1.png
var img1 []byte

func main() {
	a := app.X创建(true)
	w := window.X创建窗口(0, 0, 415, 296, "", 0, xcc.X窗口样式_默认样式)

	// 加载图片从内存
	hImg := xc.X图片_加载从内存(img1)

	// 创建形状对象-图片
	shapePic := widget.X创建形状图片(8, 30, 400, 260, w.X句柄)
	shapePic.X设置图片(hImg)

	w.X显示方式(xcc.SW_SHOW)
	a.X运行()
	a.X退出()
}
